/**
 * 整个项目api的管理
 * 
 */
import request from "./request"
export default {
    //home组件  左侧表格数据获取
    getTableData(params){
        return request({
            url:'/student/show_curriculum',
            method:'get',
            data:params,
            mock:true
        })
    },
    getCountData(){
        return request({
            url:'/home/getCountData',
            method:'get',
            mock: true
        })
    },
    getEchartData(){
        return request({
            url:'/home/getChartData',
            method:'get',
            mock: true
        })
    },
    getUserData(params){
        return request({
            url:'/user/getUser',
            method:'get',
            mock:false,
            data:params,
        });
    },
    addUser(params){
        return request({
            url:'/user/add',
            method:'post',
            mock:false,
            data:params,
        });
    },
    editUser(params){
        return request({
            url:'/user/edit',
            method:'post',
            mock:false,
            data:params,
        });
    },
    deleteUser(params){
        return request({
            url:'/user/delete',
            method:'get',
            mock:false,
            data:params,
        });
    },
    //根据用户的不同，返回不一样的菜单列表
    getMenu(params){
        // console.log(params);
        return request({
            url:'/permission/getMenu',
            method:'post',
            mock:false,
            data:params,
        });
        
    },
    login(params){
        // console.log(params);
        return request({
            url:'/student/login',
            method:'post',
            mock:true,
            params,
        });
        
    }
}